import layoutHeaderAside from '@/layout/header-aside'

const meta = {
	auth: true
}

export default {
	path: '/base',
	name: 'base',
	meta,
	redirect: {
		name: 'base-customer'
	},
	component: layoutHeaderAside,
	children: (pre => [{
			path: 'customer',
			name: `${pre}customer`,
			component: () => import('@/pages/base/customer'),
			meta: { ...meta,
				title: '客户管理'
			}
		},
		{
			path: 'supplier',
			name: `${pre}supplier`,
			component: () => import('@/pages/base/supplier'),
			meta: { ...meta,
				title: '供应商管理'
			}
		},
    {
    	path: 'goods',
    	name: `${pre}goods`,
    	component: () => import('@/pages/base/goods'),
    	meta: { ...meta,
    		title: '货物管理'
    	}
    },
    {
    	path: 'goodstype',
    	name: `${pre}goodstype`,
    	component: () => import('@/pages/base/goodstype'),
    	meta: { ...meta,
    		title: '货物类别管理'
    	}
    },
    {
    	path: 'unit',
    	name: `${pre}unit`,
    	component: () => import('@/pages/base/unit'),
    	meta: { ...meta,
    		title: '计量单位管理'
    	}
    },
    {
    	path: 'warehouse',
    	name: `${pre}warehouse`,
    	component: () => import('@/pages/base/warehouse'),
    	meta: { ...meta,
    		title: '仓库管理'
    	}
    }
	])('base-')
}
